from odoo import fields, models, api
from odoo.exceptions import UserError


class RPShipment(models.Model):
    _inherit = "rp.shipment"
    third_name = fields.Char(related="shipper_id.courier_id.third_name")
    third_type = fields.Selection(related="shipper_id.courier_id.third_type")
    third_sync_flag = fields.Boolean(string="是否同步三方订单", default=False)
    tracking_external_link = fields.Char("物流状态查询地址")
    label_url = fields.Char("面单地址")
    pdf = fields.Binary("pdf面单")

    def action_thrid_sync(self):
        pass
